/*  */
import {
    socketUrl
} from "@/utils/request/baseConfig";
import {
    requestUrl,
    request
} from "./index";

const apiModule = 'orderInfoApp/';


// 删除订单
export const deleteOrder = (data) => {
    return request(apiModule + 'delete', data);
}

// 取消订单
export const cancelOrder = (data) => {
    return request(apiModule + 'cancelNonPayOrder', data);
}

// 订单结算
export const tallyOrder = (data) => {
    return request(apiModule + 'tallyOrder', data);
}

// 提交订单
export const submitOrder = (data) => {
    return request(apiModule + 'submitOrder', data);
}

// 订单详情
export const queryOrderDetail = (data) => {
    return request(apiModule + 'get', data);
}

// 订单列表
export const queryOrderList = (data) => {
    return request(apiModule + 'queryList', data);
}

// 订单支付
export const orderPay = (data) => {
    return request(apiModule + 'orderPay', data);
}

// 余额支付
export const moneyPay = (data) => {
    return request(apiModule + 'moneyPay', data);
}

// 完成订单
export const finishOrder = (data) => {
    return request(apiModule + 'finishOrder', data);
}
//  订单金额和余额信息
export const _orderMoney = (data) => {
    return request(apiModule + 'orderMoney', data);
}
//  获取核销二维码图片
export const _getQR = () => {
    return `${requestUrl}${apiModule}/getOrderQR/`;
}
//websocket连接地址
export const _socketUrl = `${socketUrl}order-server/websocket/order/`;
//export const _socketUrl = `wss://bdance.csgxcf.com/vimi/order-server/websocket/order/`;